package com.shiyuanshenghong.util;

import com.shiyuanshenghong.entity.UserModel;
import org.apache.commons.codec.digest.DigestUtils;
import org.springframework.stereotype.Component;

/**
 * Created by LZQ on 2017/12/27.
 */
public class MDFiveDigest {

    public String md5Hex(UserModel userModel){
        return encrypt(userModel.getUserEmail(),userModel.getUserPassword());
    }

    private String encrypt(String userEmail,String userPassword){

        return DigestUtils.md5Hex(userEmail+userPassword);

    }

}
